<?php

namespace app\api\validate;

use app\common\validate\CommonValidate;

class TrainValidate
{
    public static function getTrainInfo($data)
    {
        $rule = [
            'train_id' => 'require',
        ];
        $message = [
            'train_id.require' => "参数错误",
        ];
        return CommonValidate::check($rule, $message, $data);
    }

    public static function getTrainRecord($data)
    {
        $rule = array_merge([
            //其他规则
        ], CommonValidate::$pageRule);
        $message = array_merge([
            //其他规则
        ], CommonValidate::$pageMsg);
        return CommonValidate::check($rule, $message, $data);
    }

    public static function saveTrainInfo($data)
    {
        $rule = [
            'child_id' => 'require',
        ];
        $message = [
            'child_id.require' => "参数错误",
        ];
        return CommonValidate::check($rule, $message, $data);
    }
}